﻿using ELearningSystem.Gateway.Entities;
using FluentNHibernate.Mapping;

namespace ELearningSystem.Gateway.Mappings
{
    public class VideoContentMap:ClassMap<VideoContent>
    {
        public VideoContentMap()
        {
            Id(x => x.Id);
            Map(x => x.Text);
            HasMany(x => x.Comments)
                .Not.LazyLoad()
                .Not.Inverse()
                .Cascade.All();
            HasMany(x => x.Descriptions)
                .Not.LazyLoad()
                .Not.Inverse()
                .Cascade.All();
            HasMany(x => x.References)
                .Not.LazyLoad()
                .Not.Inverse()
                .Cascade.All();
            HasMany(x => x.Materials)
                .Not.LazyLoad()
                .Not.Inverse()
                .Cascade.All();
            Map(x => x.Link);
        }
    }
}
